cmake_minimum_required(VERSION 3.0.2)
project(actionlib_test)


find_package(catkin REQUIRED COMPONENTS
  roscpp
  rospy
  std_msgs
  actionlib
  actionlib_msgs
)
 
include_directories(include ${catkin_INCLUDE_DIRS} )

add_action_files(
  FILES
  AddInts.action
  DoDishes.action
)

generate_messages(
  DEPENDENCIES
  std_msgs
  actionlib_msgs
)

catkin_package(
#  INCLUDE_DIRS include
#  LIBRARIES demo04_action
 CATKIN_DEPENDS roscpp rospy std_msgs actionlib actionlib_msgs
#  DEPENDS system_lib
)


add_executable(action_server src/action_server.cpp)
add_executable(action_client src/action_client.cpp)

add_dependencies(action_server ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
add_dependencies(action_client ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})

target_link_libraries(action_server ${catkin_LIBRARIES})
target_link_libraries(action_client ${catkin_LIBRARIES})

# ----------------------

add_executable(action_client_dish src/action_client_dish.cpp)
add_executable(action_server_dish src/action_server_dish.cpp)

add_dependencies(action_client_dish ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
add_dependencies(action_server_dish ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})

target_link_libraries(action_client_dish ${catkin_LIBRARIES})
target_link_libraries(action_server_dish ${catkin_LIBRARIES})